import {JsonController,Controller, Render, Get, UseBefore, Session,Req,Res,Ctx,QueryParams,UseInterceptor,Post,Body} from "routing-controllers";
import { config } from "../../config";
import { Service, Inject } from "typedi";
import {ClassServiceImpl} from '../../service/impl/ClassServiceImpl'
import TokenLoginMiddlewares from '../../middleware/TokenLoginMiddlewares';
import { JsonResponseInterceptor } from "../../middleware/JsonResponseMiddlewares";

@Service()
@JsonController(`${config.apiurl}/v1/classData`)
@UseInterceptor(JsonResponseInterceptor)
@UseBefore(TokenLoginMiddlewares)
export class ClassDataControllerApi {



    @Inject()
    private ClassServiceImpl!:ClassServiceImpl;


    @Get("/getClassData")
    public async getClassData (@Res() response: any,@Session() session:any,): Promise<any> {

        return await this.ClassServiceImpl.getAllClassData();
    }

    
    

  }